import request from '@/utils/request'

// 查询收发货地址列表
export function listReceivingparty(query) {
  return request({
    url: '/extend/receivingparty/list',
    method: 'get',
    params: query
  })
}

// 查询收发货地址列表
export function addressListByCustomer(query) {
  return request({
    url: '/extend/receivingparty/listByCustomer',
    method: 'get',
    params: query
  })
}

// 查询收发货地址详细
export function getReceivingparty(id) {
  return request({
    url: '/extend/receivingparty/' + id,
    method: 'get'
  })
}

// 新增收发货地址
export function addReceivingparty(data) {
  return request({
    url: '/extend/receivingparty',
    method: 'post',
    data: data
  })
}

// 修改收发货地址
export function updateReceivingparty(data) {
  return request({
    url: '/extend/receivingparty',
    method: 'put',
    data: data
  })
}

// 删除收发货地址
export function delReceivingparty(id) {
  return request({
    url: '/extend/receivingparty/' + id,
    method: 'delete'
  })
}
